export const industryOption = [
    {industryId: "A", industryName: "农、林、牧、渔业"},
    {industryId: "B", industryName: "采矿业"},
    {industryId: "C", industryName: "制造业"},
    {industryId: "D", industryName: "电力、热力、燃气及水生产和供应业"},
    {industryId: "E", industryName: "建筑业"},
    {industryId: "F", industryName: "批发和零售业"},
    {industryId: "G", industryName: "交通运输、仓储和邮政业"},
    {industryId: "H", industryName: "住宿和餐饮业"},
    {industryId: "I", industryName: "信息传输、软件和信息技术服务业"},
    {industryId: "J", industryName: "金融业"},
    {industryId: "K", industryName: "房地产业"},
    {industryId: "L", industryName: "租赁和商务服务业"},
    {industryId: "M", industryName: "科学研究和技术服务业"},
    {industryId: "N", industryName: "水利、环境和公共设施管理业"},
    {industryId: "O", industryName: "居民服务、修理和其他服务业"},
    {industryId: "P", industryName: "教育"},
    {industryId: "Q", industryName: "卫生和社会工作"},
    {industryId: "R", industryName: "文化、体育和娱乐业"},
    {industryId: "S", industryName: "公共管理、社会保障和社会组织"},
    {industryId: "T", industryName: "国际组织"}
]

/**
 * 申请入驻流程字典表
 */
export const approveStatus = [
    {text: '全部', value: ''},
    {text: '未提交', value: '0'},
    {text: '服务专员待审核', value: '1'},
    {text: '服务专员退回修改', value: '2'},
    {text: '朝阳园管委会待审核', value: '3'},
    {text: '朝阳园管委会不通过', value: '4'},
    {text: '朝阳园管委会退回修改', value: '5'},
    {text: '朝阳园管委会审批通过', value: '6'},
    {text: '朝阳园管委会分配科创经纪人', value: '7'}
]

/**
 * 服务审批流程字典表
 */
export const approveServiceStatus = [
    {text: '全部', value: ''},
    {text: '未提交', value: '0'},
    {text: '科创经济人待审核', value: '1'},
    {text: '科创经济人退回修改', value: '2'},
    {text: '科创经济人不通过', value: '3'},
    {text: '科创经济人审批通过', value: '4'},
    {text: '服务办理中', value: '5'},
    {text: '科创经纪人待审核', value: '6'},
    {text: '办理完成', value: '7'},
]

export const getOptionNameById = (optionList: Array<object>, key: { id: string, name: string }, id: string) => {
    let result = optionList.find(item => item[key.id] === id);
    return result ? result[key.name] : '';
}
export const getApproveStatus = (postStageApproveId: string) => {
    return getOptionNameById(approveStatus, { id: 'value', name: 'text' }, postStageApproveId);
};

/**
 * 获取服务审批
 * @param postStageApproveId
 */
export const getServiceApproveStatus = (postStageApproveId: string) => {
    return getOptionNameById(approveServiceStatus, { id: 'value', name: 'text' }, postStageApproveId);
};
